package code

var (
	UnknownCoder            = NewWithCodeAndMessage(100000, "An internal server error occurred", "发生内部服务器错误")
	ErrCanceledGrpc         = NewWithCodeAndMessage(100401, "The gRPC framework will generate this error code when cancellation is requested", "grpc错误：请求取消")
	ErrDeadlineExceededGrpc = NewWithCodeAndMessage(100402, "The gRPC framework will generate this error code when the deadline is exceeded", "grpc错误：超过截止日期")
	ErrMissingHeader        = NewWithCodeAndMessage(100403, "Authorization header cannot be empty.", "授权请求头不能为空")
	ErrSignatureInvalid     = NewWithCodeAndMessage(100404, "Authorization signature invalid.", "授权签名无效")
	ErrExpired              = NewWithCodeAndMessage(100405, "Authorization expired.", "授权过期")
	ErrInvalidAuthHeader    = NewWithCodeAndMessage(100406, "Authorization header format is wrong.", "授权请求头格式错误")
)

func init() {
	MustRegister(UnknownCoder)
	MustRegister(ErrCanceledGrpc)
	MustRegister(ErrDeadlineExceededGrpc)
	MustRegister(ErrMissingHeader)
	MustRegister(ErrSignatureInvalid)
	MustRegister(ErrExpired)
	MustRegister(ErrInvalidAuthHeader)
}
